<?php require_once '../library/Session.php'; ?>
<?php require_once '../library/User.php'; ?>
<?php
$User = new User();
$msg = '';
if (isset($_POST['save'])) {
    unset($_POST['save']);
    $result = $User->save($_POST);
    var_dump($result);
    $msg = $result['msg'];
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Profile</title>
    <link rel="stylesheet" href="../css/StyleSheet/styles.css" type="text/css"/>

    <link rel="stylesheet" href="../js/datepicker/jquery-ui-1.8.14.custom.css"/>
    <script type="text/javascript" src="../js/datepicker/jquery-1.5.1.min.js"></script>
    <script type="text/javascript" src="../js/datepicker/jquery-ui-1.8.14.custom.min.js"></script>
    <script type="text/javascript" src="../js/datepicker/datepicker.js"></script>
    <style type="text/css">
        input[type=submit] {
            font-size: 130%;
            height: 30px;
            width: 60%;
            margin-left: 2px;
            text-shadow: 0 1px 1px #FFFFFF;
            color: #1C4257;
            background-color: #A5CEE5;
            border-radius: 8px;
        }
    </style>
</head>

<body>
<div id="container">
    <div id="header">
        <h1><span>FIND YOUR MAJOR</span></h1>

        <div id="slogan-text" class="header-slogan">your major partner</div>

    </div>
    <div id="nav">
        <ul>
            <Li><a href="index.php">Home</a></li>
            <Li><a href="about.php">About Us</a></li>
            <li><a href="">Majors</a></li>
            <Li><a href="">Schools</a></li>
            <Li><a href="contact.php">Contact Us</a></li>
            <Li><a href="#" id="quiz" class="quiz">Take Quiz</a></li>

        </ul>

    </div>
    <div id="content">
        <div id="page">
            <div style="margin-bottom: 10px; text-align: center;"><?php echo $msg; ?></div>
            <form action="" method="post">
                <fieldset id="field">
                    <legend id="legend">Personal Profile</legend>
                    <table width="80%" align="center" cellspacing="15">

                        <tr>
                            <td>First Name</td>
                            <td><input type="text" name="firstname" id="firstname"></td>
                        </tr>

                        <tr>
                            <td>Other Name</td>
                            <td><input type="text" name="othername" id="othername"></td>
                        </tr>

                        <tr>
                            <td>Last Name</td>
                            <td><input type="text" name="lastname" id="lastname"></td>
                        </tr>

                        <tr>
                            <td>Age</td>
                            <td><select name="age" id="age" class="age" style="width: 200px">
                                <option value="choose">Please Choose One</option>
                                <option value="20-25">20-25 yrs</option>
                                <option value="25-30">25-30 yrs</option>
                                <option value="30-40">30-40 yrs</option>
                                <option value="40+">Above 40 yrs</option>
                            </select>
                            </td>
                        </tr>

                        <tr>
                            <td>Gender</td>
                            <td><input type="radio" name="gender" id="gender" value="Male">Male<br>
                                <input type="radio" name="gender" id="gender" value="Female">Female<br>
                            </td>
                        </tr>

                        <tr>
                            <td>Email</td>
                            <td><input type="text" name="email" id="email"></td>
                        </tr>

                        <tr>
                            <td>Registration Date</td>
                            <td><input type="text" id="datepick" class="date" readonly="readonly" name="reg_date"></td>
                        </tr>

                        <tr>
                            <td>Region</td>
                            <td><select name="region" id="region" class="region" style="width: 200px">
                                <option value="choose">Please Choose One</option>
                                <option value="Greater Accra">Greater Accra</option>
                                <option value="Ashanti Region">Ashanti Region</option>
                                <option value="Volta Region">Volta Region</option>
                                <option value="Brong Ahafo Region">Brong Ahafo Region</option>
                                <option value="Central Region">Central Region</option>
                                <option value="Western Region">Western Region</option>
                                <option value="Eastern Region">Eastern Region</option>
                                <option value="Upper East Region"> Upper East Region</option>
                                <option value="Upper West Region"> Upper West Region</option>
                                <option value="Northen Region"> Nothern Region</option>
                            </select></td>
                        </tr>

                        <tr>
                            <td>Role</td>
                            <td>
                                <select name="role" id="role" class="role" style="width: 200px">
                                    <option value="choose">Please Choose</option>
                                    <option value="student">Student</option>
                                </select>
                            </td>
                        </tr>
                    </table>
                </fieldset>

                <fieldset id="field">
                    <legend id="legend">Create Your Login/Account</legend>
                    <table width="80%" align="center" cellspacing="15">

                        <tr>
                            <td>Username</td>
                            <td><input type="text" name="username" id="username"></td>
                        </tr>
                        <tr>
                            <td>Password</td>
                            <td><input type="password" name="password" id="password"></td>
                        </tr>
                        <tr>
                            <td>Confirm Password</td>
                            <td><input type="password" name="confirmpassword" id="confirmpassword"></td>

                        </tr>
                        <tr>
                            <td><input type="submit" name="save" value="Begin Quiz"></td>
                        </tr>
                    </table>
                </fieldset>

            </form>
        </div>
        <div class="clear"></div>
    </div>

    <div id="footer">
        <p>&copy; 2012 ernydey,All rights reserved.</p>
    </div>

</div>
</body>
</html>
